依文件,可用下列方式來設定含有金鑰的 JSON file。
執行 eas credentials
terminal 出現未找到此命令的錯誤。zsh: command not found: eas
使用 sudo npm install -g eas-cli
在 Mac 強制安裝全域的 CLI。
> eas credentials
Project config: Slug for project identified by "extra.eas.projectId" (notificationprocess) does not match the "slug" field (NotificationProgress). Learn more
Error: credentials command failed.
這時候使用網頁瀏覽器開啟 Expo 主控台。
查看 Slug
欄位的值,是否與專位 app.json 內 "slug":值
是否對應。
重新運行,發現專案尚未 init eas。
> eas credentials
✔ Select platform › Android
eas.json could not be found at /Users/minjing/development/jim/NotificationProgress/eas.json. Learn more at https://expo.fyi/eas-json
Error: credentials command failed.
執行 eas init
~/d/jim/NotificationProgress | on develop !4 ?2 ------- took 4s | at 23:39:22
> eas init
✔ Project already linked (ID: 值). To re-configure, remove the "extra.eas.projectId" field from your app config.
執行結果再確認一下,是否與網頁上 Expo 主控台的專案 ID 一致。